import request from "./useRequests";
import { ElMessage } from 'element-plus'

export default function getAboutUs() {
    async function fetchingFooter() {
        try {
            const res = await request.get('/news/aboutUs')
            if (res.data.success == true) {
                return res.data.data
            } else {
                ElMessage({
                    showClose: true,
                    message: `${res.data.message}`,
                    type: 'error',
                })
                // console.log(res)
            }
        } catch (err: any) {
            //alert(err)
        }
    }

    return {
        fetchingFooter
    }
}